<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/bmp-tools.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('bmp-tools_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/bmp-tools.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for bmp-tools.h:</div>
<div class="dyncontent">
<div class="center"><img src="bmp-tools_8h__incl.png" border="0" usemap="#includes_2bmp-tools_8h" alt=""/></div>
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="bmp-tools_8h__dep__incl.png" border="0" usemap="#includes_2bmp-tools_8hdep" alt=""/></div>
<map name="includes_2bmp-tools_8hdep" id="includes_2bmp-tools_8hdep">
<area shape="rect" id="node3" href="graphbmp-tools_8h.html" title="includes/graphbmp&#45;tools.h" alt="" coords="5,83,179,112"/></map>
</div>
</div>
<p><a href="bmp-tools_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structRGB.html">RGB</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gestisce in modo semplice una bitmap  <a href="structRGB.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structImage.html">Image</a></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#ad86358bf19927183dd7b4ae215a29731">COLOR_RED</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){255,0,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a68b9570c39bd1e193fe65b734cc47cb2">COLOR_DARK_RED</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){100,0,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#aef75f616b9a3fdb10d38395dfb996873">COLOR_ORANGE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,95,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#af1efa5dc76aa7ffe86b49e29721d76eb">COLOR_DARK_ORANGE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){125,40,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a4534b577b74a58b0f4b7be027af664e0">COLOR_YELLOW</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,175,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#aa705a7627553e492368081ee16f1ae68">COLOR_DARK_YELLOW</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,75,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#afc9149f5de51bd9ac4f5ebbfa153f018">COLOR_GREEN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,255,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#aaaaec42f9e5d8b8240243192d9ee43ec">COLOR_DARK_GREEN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,100,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a7d60e4dfa049d9ba46d0670fa2f21053">COLOR_CIAN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,175,175}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a9d51963b003fa68e46b22fac5ea28cfe">COLOR_DARK_CIAN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,75,75}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a23c70d699a5a775bc2e1ebeb8603f630">COLOR_BLUE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,255}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a13d2340de395ffd615ad44cf397377d7">COLOR_DARK_BLUE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,100}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a074ac45312467d6ea439637095c01925">COLOR_VIOLET</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,0,175}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a4e819fbec55f5a4bde446fef72dd5032">COLOR_DARK_VIOLET</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,0,75}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a502b77f3a488ac4b6331e37d0ee3a80e">COLOR_GREY</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,175,175}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a48b5aa8090b47348dddba1c4d01eb0df">COLOR_DARK_GREY</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,75,75}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#aba2a7fe77a7501e5844370eec0185207">COLOR_BLACK</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,0}</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a9b44987ffdc2af19b635206b94334b69">COLOR_WHITE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){255,255,255}</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structRGB.html">RGB</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#ab4883aa27e608dfa6053e326759e58ee">RGB</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gestisce in modo semplice una bitmap  <a href="#ab4883aa27e608dfa6053e326759e58ee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structImage.html">Image</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a9082e6aa9fd1705dc218cf44bc5a9d66">Image</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structImage.html">Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structRGB.html">RGB</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#adb742af21055c1163a47a04d79eaf2f1">PRGB</a></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a2304a52dedbf0d6c2fa867cbe99456fe">initImage</a> (int w, int h)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#ac6ef3db94845a339fd033fd8721fa09c">freeImage</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structRGB.html">RGB</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a24e5c53a2745051f29c087b7a7746a44">getRGB</a> (unsigned char r, unsigned char g, unsigned char b)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a028c544411b16dc981510a486955dbe1">printRGB</a> (FILE *f, <a class="el" href="structRGB.html">RGB</a> rgb)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a6e5a0ee5f0004be05a94a16764043f2c">equalsRGB</a> (<a class="el" href="structRGB.html">RGB</a> color1, <a class="el" href="structRGB.html">RGB</a> color2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a75a28516aa9aab1107d55859b93a4fd5">setPixelInImage</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int x, int y, <a class="el" href="structRGB.html">RGB</a> rgb)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a52335e173e1290a42a2074760f41b275">updatePixelInImage</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int x, int y, <a class="el" href="structRGB.html">RGB</a> rgb)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a584227fbe4068c495925aa43da75154e">writeHeaderInFile</a> (FILE *f, int M, int N)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a88649c6c08383d9fb6adb1e1b9ff61f4">applyImageToFile</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, FILE *bmpfile)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#a879b08ba3760bae6c7339b6cbb1a800d">fillColor</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, <a class="el" href="structRGB.html">RGB</a> color)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bmp-tools_8h.html#ac8f09d87c60b7d9b2dd3786b4d50fb16">drawLine</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int fromx, int fromy, int tox, int toy, int radius, <a class="el" href="structRGB.html">RGB</a> color)</td></tr>
</table>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="aba2a7fe77a7501e5844370eec0185207"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_BLACK" ref="aba2a7fe77a7501e5844370eec0185207" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#aba2a7fe77a7501e5844370eec0185207">COLOR_BLACK</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a23c70d699a5a775bc2e1ebeb8603f630"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_BLUE" ref="a23c70d699a5a775bc2e1ebeb8603f630" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a23c70d699a5a775bc2e1ebeb8603f630">COLOR_BLUE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,255}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a7d60e4dfa049d9ba46d0670fa2f21053"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_CIAN" ref="a7d60e4dfa049d9ba46d0670fa2f21053" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a7d60e4dfa049d9ba46d0670fa2f21053">COLOR_CIAN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,175,175}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a13d2340de395ffd615ad44cf397377d7"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_BLUE" ref="a13d2340de395ffd615ad44cf397377d7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a13d2340de395ffd615ad44cf397377d7">COLOR_DARK_BLUE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,0,100}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9d51963b003fa68e46b22fac5ea28cfe"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_CIAN" ref="a9d51963b003fa68e46b22fac5ea28cfe" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a9d51963b003fa68e46b22fac5ea28cfe">COLOR_DARK_CIAN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,75,75}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aaaaec42f9e5d8b8240243192d9ee43ec"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_GREEN" ref="aaaaec42f9e5d8b8240243192d9ee43ec" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#aaaaec42f9e5d8b8240243192d9ee43ec">COLOR_DARK_GREEN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,100,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a48b5aa8090b47348dddba1c4d01eb0df"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_GREY" ref="a48b5aa8090b47348dddba1c4d01eb0df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a48b5aa8090b47348dddba1c4d01eb0df">COLOR_DARK_GREY</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,75,75}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af1efa5dc76aa7ffe86b49e29721d76eb"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_ORANGE" ref="af1efa5dc76aa7ffe86b49e29721d76eb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#af1efa5dc76aa7ffe86b49e29721d76eb">COLOR_DARK_ORANGE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){125,40,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a68b9570c39bd1e193fe65b734cc47cb2"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_RED" ref="a68b9570c39bd1e193fe65b734cc47cb2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a68b9570c39bd1e193fe65b734cc47cb2">COLOR_DARK_RED</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){100,0,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4e819fbec55f5a4bde446fef72dd5032"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_VIOLET" ref="a4e819fbec55f5a4bde446fef72dd5032" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a4e819fbec55f5a4bde446fef72dd5032">COLOR_DARK_VIOLET</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,0,75}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aa705a7627553e492368081ee16f1ae68"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_DARK_YELLOW" ref="aa705a7627553e492368081ee16f1ae68" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#aa705a7627553e492368081ee16f1ae68">COLOR_DARK_YELLOW</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){75,75,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="afc9149f5de51bd9ac4f5ebbfa153f018"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_GREEN" ref="afc9149f5de51bd9ac4f5ebbfa153f018" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#afc9149f5de51bd9ac4f5ebbfa153f018">COLOR_GREEN</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){0,255,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a502b77f3a488ac4b6331e37d0ee3a80e"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_GREY" ref="a502b77f3a488ac4b6331e37d0ee3a80e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a502b77f3a488ac4b6331e37d0ee3a80e">COLOR_GREY</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,175,175}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="aef75f616b9a3fdb10d38395dfb996873"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_ORANGE" ref="aef75f616b9a3fdb10d38395dfb996873" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#aef75f616b9a3fdb10d38395dfb996873">COLOR_ORANGE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,95,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ad86358bf19927183dd7b4ae215a29731"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_RED" ref="ad86358bf19927183dd7b4ae215a29731" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#ad86358bf19927183dd7b4ae215a29731">COLOR_RED</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){255,0,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a074ac45312467d6ea439637095c01925"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_VIOLET" ref="a074ac45312467d6ea439637095c01925" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a074ac45312467d6ea439637095c01925">COLOR_VIOLET</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,0,175}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9b44987ffdc2af19b635206b94334b69"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_WHITE" ref="a9b44987ffdc2af19b635206b94334b69" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a9b44987ffdc2af19b635206b94334b69">COLOR_WHITE</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){255,255,255}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a4534b577b74a58b0f4b7be027af664e0"></a><!-- doxytag: member="bmp&#45;tools.h::COLOR_YELLOW" ref="a4534b577b74a58b0f4b7be027af664e0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="bmp-tools_8h.html#a4534b577b74a58b0f4b7be027af664e0">COLOR_YELLOW</a>&#160;&#160;&#160;(<a class="el" href="structRGB.html">RGB</a>){175,175,0}</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="a9082e6aa9fd1705dc218cf44bc5a9d66"></a><!-- doxytag: member="bmp&#45;tools.h::Image" ref="a9082e6aa9fd1705dc218cf44bc5a9d66" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structImage.html">Image</a>  <a class="el" href="structImage.html">Image</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>rappresenta la struttura principale per la semplice gestione di un'immagine. Inizializzarla tramite la funzione <a class="el" href="bmp-tools_8h.html#a2304a52dedbf0d6c2fa867cbe99456fe">initImage()</a>. Questa struttura non e' altro che una matrice di <a class="el" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> elementi (ossia di pixels). E' possibile accederci in modo semplice tramite i metodi: </p>
<ul>
<li>setPixelInImage </li>
<li>getRGB </li>
</ul>

</div>
</div>
<a class="anchor" id="ab031ba345632642ed0e54b7315d1767e"></a><!-- doxytag: member="bmp&#45;tools.h::Pimage" ref="ab031ba345632642ed0e54b7315d1767e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structImage.html">Image</a>* <a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>un puntatore ad un'immagine. Utile per passare come riferimento l'immagine stessa evitando quindi di copiare questa enorme struttura </p>

</div>
</div>
<a class="anchor" id="adb742af21055c1163a47a04d79eaf2f1"></a><!-- doxytag: member="bmp&#45;tools.h::PRGB" ref="adb742af21055c1163a47a04d79eaf2f1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structRGB.html">RGB</a>* <a class="el" href="bmp-tools_8h.html#adb742af21055c1163a47a04d79eaf2f1">PRGB</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ab4883aa27e608dfa6053e326759e58ee"></a><!-- doxytag: member="bmp&#45;tools.h::RGB" ref="ab4883aa27e608dfa6053e326759e58ee" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structRGB.html">RGB</a>  <a class="el" href="structRGB.html">RGB</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gestisce in modo semplice una bitmap </p>
<p>bmpHandler.h</p>
<p>Created on: May 21, 2013 Author: koldarrappresenta un colore di tipo <a class="el" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a88649c6c08383d9fb6adb1e1b9ff61f4"></a><!-- doxytag: member="bmp&#45;tools.h::applyImageToFile" ref="a88649c6c08383d9fb6adb1e1b9ff61f4" args="(Pimage img, FILE *bmpfile)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a88649c6c08383d9fb6adb1e1b9ff61f4">applyImageToFile</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>bmpfile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>scrive all'interno di un file l'immagine scelta</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL e inizializzato correttamente (trmaite <a class="el" href="bmp-tools_8h.html#a2304a52dedbf0d6c2fa867cbe99456fe">initImage()</a> ) </li>
<li>bmp non NULL, aperto in scrittura (fopen(f,"w");) </li>
<li>la funzione writeHeaderInFile deve essere gia' stata creata </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>all'interno del file bmpfile e' contenuta una struttura che puo' essere interpretata come una bitmap</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td></td></tr>
    <tr><td class="paramname">bmpfile</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac8f09d87c60b7d9b2dd3786b4d50fb16"></a><!-- doxytag: member="bmp&#45;tools.h::drawLine" ref="ac8f09d87c60b7d9b2dd3786b4d50fb16" args="(Pimage img, int fromx, int fromy, int tox, int toy, int radius, RGB color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#ac8f09d87c60b7d9b2dd3786b4d50fb16">drawLine</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fromx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fromy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>tox</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>toy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>radius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>traccia una linea dalle coordinate (fromx; fromy) alle cooridnate (tox; toy) di ampiezza radius e colore color</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL </li>
<li>fromx appartenente a [0;W[ </li>
<li>fromy appartiene a [0;H[ </li>
<li>tox appartiene a [0;W[ </li>
<li>toy appartiene a [0;H[ </li>
<li>radius positivo o nullo </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>su img viene tracciata una linea</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine su cui tracciare la linea </td></tr>
    <tr><td class="paramname">fromx</td><td>l'ascissa del primo estremo della linea </td></tr>
    <tr><td class="paramname">fromy</td><td>l'ordinata del primo estremo della linea </td></tr>
    <tr><td class="paramname">tox</td><td>l'ascissa del secondo estremo della linea </td></tr>
    <tr><td class="paramname">toy</td><td>l'ordinata del secondo estremo della linea </td></tr>
    <tr><td class="paramname">radius</td><td>il raggio della linea da tracciare. 0 per la linea piu' sottile possibile </td></tr>
    <tr><td class="paramname">color</td><td>il colore con cui tracciare la linea </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6e5a0ee5f0004be05a94a16764043f2c"></a><!-- doxytag: member="bmp&#45;tools.h::equalsRGB" ref="a6e5a0ee5f0004be05a94a16764043f2c" args="(RGB color1, RGB color2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="bmp-tools_8h.html#a6e5a0ee5f0004be05a94a16764043f2c">equalsRGB</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a879b08ba3760bae6c7339b6cbb1a800d"></a><!-- doxytag: member="bmp&#45;tools.h::fillColor" ref="a879b08ba3760bae6c7339b6cbb1a800d" args="(Pimage img, RGB color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a879b08ba3760bae6c7339b6cbb1a800d">fillColor</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>riempie tutta l'immagine passata come parametro di un unico colore</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL </li>
<li>color inizializzato correttamente </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>ogni pixel contenuto nell'immagine img ha come colore quello nel parametro color</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine da riempire </td></tr>
    <tr><td class="paramname">color</td><td>il colore con cui riempire l'intera immagine </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac6ef3db94845a339fd033fd8721fa09c"></a><!-- doxytag: member="bmp&#45;tools.h::freeImage" ref="ac6ef3db94845a339fd033fd8721fa09c" args="(Pimage img)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#ac6ef3db94845a339fd033fd8721fa09c">freeImage</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>libera la memoria occupata da img</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine da deallocare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a24e5c53a2745051f29c087b7a7746a44"></a><!-- doxytag: member="bmp&#45;tools.h::getRGB" ref="a24e5c53a2745051f29c087b7a7746a44" args="(unsigned char r, unsigned char g, unsigned char b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structRGB.html">RGB</a> <a class="el" href="bmp-tools_8h.html#a24e5c53a2745051f29c087b7a7746a44">getRGB</a> </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce un'istanza di un colore di un pixel. Utile per assegnare un colore ad un pixel. Questa funzione e' spesso utilizzata in <a class="el" href="bmp-tools_8h.html#a75a28516aa9aab1107d55859b93a4fd5">setPixelInImage()</a></p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">r</td><td>il canale rosso del colore </td></tr>
    <tr><td class="paramname">g</td><td>il canale verde del colore </td></tr>
    <tr><td class="paramname">b</td><td>il canale blu del colore </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>una struttura <a class="el" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> rappresentante un colore </dd></dl>

</div>
</div>
<a class="anchor" id="a2304a52dedbf0d6c2fa867cbe99456fe"></a><!-- doxytag: member="bmp&#45;tools.h::initImage" ref="a2304a52dedbf0d6c2fa867cbe99456fe" args="(int w, int h)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> <a class="el" href="bmp-tools_8h.html#a2304a52dedbf0d6c2fa867cbe99456fe">initImage</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>w</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>h</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>costruisce un'immagine in memoria. Controllare sempre w e h poiche' questa struttura occupa molta memoria. </p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>w positivo non nullo </li>
<li>h positivo non nullo </li>
<li>un po' di memoria libera disponibile</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">w</td><td>la lunghezza (in pixel) della bitmap </td></tr>
    <tr><td class="paramname">h</td><td>l'altezza (in pixel) della bitmap </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>un puntatore ad un'immagine in memoria </dd></dl>

</div>
</div>
<a class="anchor" id="a028c544411b16dc981510a486955dbe1"></a><!-- doxytag: member="bmp&#45;tools.h::printRGB" ref="a028c544411b16dc981510a486955dbe1" args="(FILE *f, RGB rgb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a028c544411b16dc981510a486955dbe1">printRGB</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>rgb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a75a28516aa9aab1107d55859b93a4fd5"></a><!-- doxytag: member="bmp&#45;tools.h::setPixelInImage" ref="a75a28516aa9aab1107d55859b93a4fd5" args="(Pimage img, int x, int y, RGB rgb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a75a28516aa9aab1107d55859b93a4fd5">setPixelInImage</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>rgb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>imposta il colore pixel all'interno dell'immagine al valore rgb </p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL </li>
<li>x positivo (o nullo) e minore stretto del campo width di img </li>
<li>y positivo (o nullo) e minore stretto del campo height di img </li>
<li><a class="el" href="structRGB.html" title="gestisce in modo semplice una bitmap">RGB</a> inizializzato correttamente </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>all'interno dell'immagine img, nel pixel di coordinate (x;y) e' contenuto il colore rgb</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine da modificare </td></tr>
    <tr><td class="paramname">x</td><td>la coodinata x (lunghezza) del pixel. 0 indica il lato sinistro dell'immagine </td></tr>
    <tr><td class="paramname">y</td><td>la coordinata y (altezza) del pixel. 0 indica il lato in alto dell'immagine </td></tr>
    <tr><td class="paramname">rgb</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a52335e173e1290a42a2074760f41b275"></a><!-- doxytag: member="bmp&#45;tools.h::updatePixelInImage" ref="a52335e173e1290a42a2074760f41b275" args="(Pimage img, int x, int y, RGB rgb)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a52335e173e1290a42a2074760f41b275">updatePixelInImage</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>rgb</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a584227fbe4068c495925aa43da75154e"></a><!-- doxytag: member="bmp&#45;tools.h::writeHeaderInFile" ref="a584227fbe4068c495925aa43da75154e" args="(FILE *f, int M, int N)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="bmp-tools_8h.html#a584227fbe4068c495925aa43da75154e">writeHeaderInFile</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>M</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>scrive all'interno di un file l'header della bitmap. Questa operazione e' necessaria affinche' il file venga visto dal computer proprio come una bitmap. E' inoltre importante, quando si vorra' inserire una <a class="el" href="structImage.html">Image</a> all'interno del file, che essa abbia come altezza il valore M e come lunghezza il valore N</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>f aperto in modalita' di scrittura (fopen(file,"w")) non NULL </li>
<li>M strettamente positivo </li>
<li>N strettamente positivo </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>all'interno del file f e' scritto un semplicissimo header (che non supporta le funzionalita' avanzate della bitmap, come per esempio la compressione, l'alpha channel o le palettes) compatbile con una <a class="el" href="structImage.html">Image</a> di width=N e height=M</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file che conterra' la bitmap </td></tr>
    <tr><td class="paramname">M</td><td>l'altezza della bitmap </td></tr>
    <tr><td class="paramname">N</td><td>la lunghezza della bitmap </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="bmp-tools_8h.html">bmp-tools.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:36 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
